package com.dries.portal.module.chat.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 消息表
 * 
 * @author dries
 * @email samphsanie@gmail.com
 * @date 2020-08-11 14:24:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("xx_msg")
public class Msg implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 消息ID
	 */
	@TableId(type = IdType.AUTO)
	private Long msgId;
	/**
	 * 消息类型
	 */
	private Integer type;
	/**
	 * 发送者
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long sender;
	/**
	 * 接收者
	 */
	private String receiver;
	/**
	 * 消息签收状态
	 */
	private Integer signFlag;
	/**
	 * 消息内容
	 */
	private String content;
	/**
	 * 消息内容类型
	 */
	private Integer contentType;
	/**
	 * 扩展字段
	 */
	private String ext;
	/**
	 * 消息状态 0 删除 1 正常
	 */
	private Integer status;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 修改时间
	 */
	private Date modified;

}
